//
//  ImageViewOfButton.m
//  UI_homework_03_封装UIButton
//
//  Created by li cheng on 16/7/18.
//  Copyright © 2016年 li cheng. All rights reserved.
//

#import "ImageViewOfButton.h"

@implementation ImageViewOfButton
- (nullable instancetype)initWithFrame:(CGRect)frame image:(nullable UIImage *)image target:(nullable id)target action:(nullable SEL)action{
    self = [super initWithFrame:frame];
    if (self) {
        self.image = image;
        UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:target action:action];
        [self addGestureRecognizer:tap];
        self.userInteractionEnabled = YES;
    }
    return self;
}


@end
